		<div id="col-left">
			<div id="main-menu">我的</div>
			<ul id="sub-menu" class="clearfix">
				<?php
					if(!$submenu) echo "<li>暂无子目录</li>";
					else{
						foreach($submenu as $row){
							echo "<li>{$row['name']}</li>";
						}
					}
				?>
			
			</ul>
		</div>

		<div id="col-main" class="fx-widgets">
			<div id="fx-tabs">
				<ul class="clearfix">
					<li><a href="#tabs-1">后台首页</a></li><span id="newtab">+</span>
				</ul>
				<div id="tabs-1">
					<p>暂无内容</p>
				</div>
	
		</div>
		</div>
		<script src="<?php echo $baseurl.STAPATH?>js/jquery.min.js"></script>
		<script src="<?php echo $baseurl.STAPATH?>js/jquery.ui/jquery-ui-1.8.18.custom.min.js"></script>
		<script src="<?php echo $baseurl.STAPATH?>js/jquery.ui/jquery.ui.widget.js"></script>
		<script src="<?php echo $baseurl.STAPATH?>js/jquery.ui/jquery.ui.tabs.js"></script>
		<script>
			$(document).ready(function(){
			/*************添加关闭标签******************/
				$("#fx-tabs").tabs({add: addEventHandler});
				$('#newtab').click(addTab);	
			/*************初始化子菜单******************/
				$("#menu li").click(function(){
					var link=$(this).find("a");
					link.addClass("linkcolor");
					$(this).siblings().find("a").removeClass("linkcolor");
					var url=link.attr("name");
					var mmenu=link.html();
					$.ajax({
						type:"get",
						url:url,
						dataType:"text",
						success:function(data){
							if(data=="err00"){
								$("#main-menu").html(mmenu);
								$("#sub-menu").html("");
								$("<li>暂无子目录</li>").appendTo("#sub-menu");
								return;
							}
							$("#main-menu").html(mmenu);
							data=JSON.parse(data);
							var listr="";
							$.each(data,function(n,row){
								listr+="<li>"+row.name+"</li>";
								
							
							});
							var lis=$(listr);
							$("#sub-menu").html("");
							lis.appendTo("#sub-menu");
						},
					});
				});
				/**********关闭按钮样式***************/
				$("#fx-tabs em").hover(
					function(){
						$(this).css("background","#222222");
					},
					function(){
					
						$(this).css("background","#ffffff");
					}
				);
			});
			/**********标签添加关闭*******************/
			var tabCounter = 1;
			function addTab() {
				$('<div id="new-tab-' + tabCounter + '">' + 'New tab' + tabCounter + '</div>').appendTo('#fx-tabs');
				$('#fx-tabs').tabs("add", "#new-tab-" + tabCounter, 'New tab' + tabCounter,tabCounter);
				$('#fx-tabs').tabs("option","selected",tabCounter);
				tabCounter++;
			}
			function addEventHandler(event, ui) {
				var li = $(ui.tab).parent();
				$('<em>X</em>').css({"cursor":"pointer","font-style":"normal","font-size":"12px"})
				.appendTo(li).click(function() { //关闭按钮,关闭事件绑定 
					var li = $(ui.tab).parent();
					var index = $("#fx-tabs li").index(li.get(0));
					$("#fx-tabs").tabs("remove", index);
					tabCounter--;
				});
				$(ui.tab).dblclick(function() { //双击关闭事件绑定 
					var li = $(ui.tab).parent();
					var index = $('#fx-tabs li').index(li.get(0));
					$("#fx-tabs").tabs("remove", index);
					tabCounter--;
				});
			}
		</script>
	</body>
</html>